home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 408_01 / pccharst.h < prev    next >
C/C++ Source or Header  |  1993-08-18  |  2KB  |  45 lines

  1. /*
  2.     SNEWS 1.91
  3.  
  4.     PCCHARST.H - public decls in pccharst.c
  5.  
  6.     Copyright (C) 1993  Daniel Fandrich
  7.                         <dan@fch.wimsey.bc.ca> or CompuServe 72365,306
  8.  
  9.  
  10.     This program is free software; you can redistribute it and/or modify
  11.     it under the terms of the GNU General Public License, version 1, as
  12.     published by the Free Software Foundation.
  13.  
  14.     This program is distributed in the hope that it will be useful,
  15.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.     GNU General Public License for more details.
  18.  
  19.     See the file COPYING, which contains a copy of the GNU General
  20.     Public License.
  21.  
  22.  
  23.     Source is formatted with a tab size of 4.
  24.  
  25.  */
  26.  
  27. #define DEFAULT_CHAR_SET X_IBM437    /* change this to read from .rc file */
  28.  
  29. /* Make sure code_page_list[] contains all these */
  30. enum code_pages {CP437=0, CP850, /* CP852, CP857, CP860, CP861, CP863, CP865, */ CP_NOT_SUPP};
  31.  
  32. /* Make sure char_set_names[] matches these enums */
  33. /* US_ASCII must be last */
  34. enum char_sets {X_IBM437=0, ISO_8859_1, ISO_8859_2, ISO_8859_3,
  35.                                 ISO_8859_4, ISO_8859_9, US_ASCII};
  36.  
  37. extern enum code_pages code_page_table;
  38.  
  39. int get_code_page(void);
  40. enum code_pages select_cp_table(int code_page_num);
  41. enum char_sets select_char_set(char *name);
  42. unsigned char translate_char(unsigned char inchar, enum char_sets cset);
  43. char *translate_line(char *origline, enum char_sets cset);
  44. char *translate_header(char *origline, enum char_sets cset);
  45.